import React from 'react'
import className from 'classnames'
import LoginStyle from './login.module.css'
import PropTypes from 'prop-types'

const Login = ({ size = 'medium' }) => {
  const buttonClass = `${
    size === 'large' ? LoginStyle['bg-lg'] : LoginStyle['bg-sm']
  }`

  const buttonStyle = {
    backgroundColor: 'red',
    color: 'white',
  }

  return (
    <div className={className(LoginStyle['bg-cl'], buttonClass)}>
      Login Page
      <div style={{ marginTop: '20px' }}>
        <button style={buttonStyle}>Login</button>
      </div>
    </div>
  )
}

// 添加 PropTypes 验证
Login.propTypes = {
  size: PropTypes.oneOf(['small', 'medium', 'large']),
}

export default Login
